﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace ch04
{
    class Class1
    {
        static void Main(string[] args)
        {
            Console.Write("请输入一句话：");
            string str = Console.ReadLine();

            //Regex reg = new Regex(@"abc");
            //Regex reg = new Regex(@"[abc]");
            //Regex reg = new Regex(@"^[a-z]$");
            //Regex reg = new Regex(@"^[a-z]+$");
            Regex reg = new Regex(@"^[a-zA-Z ]+$");

            Console.WriteLine(reg.IsMatch(str));

        }
    }
}
